//
//  ModelBase.h
//  Ares-models
//
//  Created by cola tin on 16/2/1.
//  Copyright © 2016年 linkedcare. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LCModel : NSObject <NSCopying, NSCoding>
- (instancetype)initWithDictionary:(NSDictionary *)dict;
@property(nonatomic, copy, readonly) NSDictionary *dictionaryValue;

// property key到dict key的映射
+ (NSDictionary<NSString*, NSString*> *)rawKeysByPropertyKeys;
// dict中的值转换成property值
+ (id)propertyByRaw:(id)raw forKey:(NSString *)key;
// property值转换成dict中的值
+ (id)rawByProperty:(id)prop forKey:(NSString *)key;

+ (instancetype)modelWithDictionary:(NSDictionary *)dict;
+ (NSArray<NSString *> *)propertyKeys;
+ (Class)classOfPropertyKey:(NSString *)key;

+ (NSArray<LCModel*> *)modelsWithArray:(NSArray<NSDictionary*> *)array;
+ (NSArray<NSDictionary*> *)arrayWithModels:(NSArray<LCModel*> *)models;

- (BOOL)isEqual:(id)object;
- (void)clear;
@end
